package com.pro.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.Objects;

/**
 * @author 笑笑
 * @create 2021/11/4下午 03:46
 * 商品视频审核类
 */

public class CourseRecord {
    private Integer id;//主键id
    private Integer courseId;//视频id 商品id

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GTM+8")
    private Date applyDate;//发起时间
    private String launchId;//发起人
    private String implementId;//执行人

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GTM+8")
    private Date implementDate;//执行时间
    private Integer result;//结果，1为审核通过，2为待审核，3为审核驳回
    private String remarks;//备注
    private Integer type;//类型，2视频，3商品

    public CourseRecord() {
    }

    public CourseRecord(Integer id, Integer courseId, Date applyDate, String launchId, String implementId, Date implementDate, Integer result, String remarks, Integer type) {
        this.id = id;
        this.courseId = courseId;
        this.applyDate = applyDate;
        this.launchId = launchId;
        this.implementId = implementId;
        this.implementDate = implementDate;
        this.result = result;
        this.remarks = remarks;
        this.type = type;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public Date getApplyDate() {
        return applyDate;
    }

    public void setApplyDate(Date applyDate) {
        this.applyDate = applyDate;
    }

    public String getLaunchId() {
        return launchId;
    }

    public void setLaunchId(String launchId) {
        this.launchId = launchId;
    }

    public String getImplementId() {
        return implementId;
    }

    public void setImplementId(String implementId) {
        this.implementId = implementId;
    }

    public Date getImplementDate() {
        return this.implementDate;
    }

    public void setImplementDate(Date implementDate) {
        this.implementDate = implementDate;
    }

    public Integer getResult() {
        return result;
    }

    public void setResult(Integer result) {
        this.result = result;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CourseRecord that = (CourseRecord) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(courseId, that.courseId) &&
                Objects.equals(applyDate, that.applyDate) &&
                Objects.equals(launchId, that.launchId) &&
                Objects.equals(implementId, that.implementId) &&
                Objects.equals(implementDate, that.implementDate) &&
                Objects.equals(result, that.result) &&
                Objects.equals(remarks, that.remarks) &&
                Objects.equals(type, that.type);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, courseId, applyDate, launchId, implementId, implementDate, result, remarks, type);
    }

    @Override
    public String toString() {
        return "CourseRecord{" +
                "id=" + id +
                ", courseId=" + courseId +
                ", applyDate=" + applyDate +
                ", launchId='" + launchId + '\'' +
                ", implementId='" + implementId + '\'' +
                ", implementDate=" + implementDate +
                ", result=" + result +
                ", remarks='" + remarks + '\'' +
                ", type=" + type +
                '}';
    }
}
